<template>
	<!-- 项目笔记 -->
	<view>
		<hx-navbar ref="hxnb" :config="config" />
		<view style="padding-top:30rpx;background-color: #fff;">
			<view v-for="(item,index) in notesList" :key="index" style="padding:30rpx;">
				<view @click="notesDetails(item.projectNum,item.id)">
					<view style="color: #000000;font-size: 36rpx;font-weight:650;">{{item.title}}</view>
					<view class="title">实地勘查</view>
					<view style="font-size: 28rpx;color: #000000;">{{item.content}}</view>
					<view style="margin: 30rpx 0;">
						<u-album :urls="[item.image]" keyName="src2" space="5"></u-album>
					</view>
				</view>
			</view>
		</view>
		<view v-if="notesList == ''" style="padding: 30rpx;margin-top: 300rpx;">
			<image src="/clientEnd/static/kong.png" style="width: 236rpx;height: 236rpx; display: block;margin: auto;"
				mode=""></image>
			<view style="text-align: center;color: rgba(30,30,30,0.3);line-height: 60rpx;">
				TA还没有发布任何笔记哦！
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config: {
					title: '项目笔记',
					color: '#111111',
					backgroundColor: [1, '#FFFFFF'],
					border: true,
					// #ifdef H5
					backPage: '',
					// #endif
				},
				notesList: [],
				token: '',
				id: ''
			}
		},
		onLoad(e) {
			this.id = e.id
			console.log('呆呆鸟', this.id)
			this.token = this.$cache.get('token')
			this.getDetails()
		},
		methods: {
			// 设计师详情
			getDetails() {
				let data = {
					id: this.id
				}
				if (this.token == null) {
					this.$api.deviseDetail(data).then((res) => {
						this.notesList = res.data.result.projectList
					})
				} else {
					this.$api.entryDeviseDetail(data).then((res) => {
						this.notesList = res.data.result.projectList
						// console.log('daidainiao', res)
					})
				}
			},
			notesDetails(projectNum,Id) {
				this.$tools.goPageNoAuth('notesDetails?orderNum=' + projectNum + '&Id=' + Id)
			}
		}
	}
</script>

<style scoped>
	.title {
		color: rgba(30, 30, 30, 0.3);
		background: rgba(30, 30, 30, 0.1);
		border-radius: 22rpx;
		font-size: 24rpx;
		text-align: center;
		width: 150rpx;
		margin: 20rpx 6rpx;
		line-height: 40rpx;
	}
</style>
